<%@page import="com.qububu.utils.SystemConstants"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%
String basePath = request.getContextPath();
%>
<title>后台管理</title>

<style type="text/css">
body {
	margin: 0;
	padding: 0;
	font-size: 12px;
	font-family: 微软雅黑;
}

.main-box {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
	width: 980px;
	min-height: 680px;
	height: auto !important;
	height: 680px;
	border: 1px solid #8CC700;
}

.top {
	width: 100%;
	height: 80px;
	background: #8CC700;
}

.menu-box {
	float: left;
	width: 160px;
	min-height: 600px;
	height: auto !important;
	height: 600px;
	background: #8CC700;
	text-align: left;
}

.menu-box .menu {
	min-height: 40px;
	height: auto !important;
	height: 40px;
	width: 100%;
	font-size: 16px;
	border-top: 1px solid #AED4F5;
	overflow: hidden;
}

.menu-box .menu ul {
	display: none;
	margin-top: -5px;
	width: 70%;
	overflow: hidden;
	font-size: 13px;
}

.menu-box .menu ul li {
	padding: 5px;
	height: 20px;
	line-height: 20px;
	overflow: hidden;
	border-bottom: 1px dashed #C3E99E;
	cursor: pointer;
}

.menu-box .menu .menu-main-box {
	padding: 0 15px;
	height: 40px;
	line-height: 40px;
	width: 100%;
	cursor: pointer;
	overflow: hidden;
}

.menu-box .menu .menu-main-box .menu-main-box-text {
	 float: left; width: auto; height: 100%; height: 40px; line-height: 40px;
}

.menu-box .menu .menu-main-box .menu-main-box-pointer {
	  float: left; width: 10px; height: 100%; margin-left: 10px; font-size: 20px; height: 40px; line-height: 40px;
}

.control-box {
	float: left;
	width: 820px;
	height: 600px;
	background: #FFFFFF;
}

.control-box iframe {
	width: 100%;
	height: 100%;
	border-style: none;
	border: 0;
}
</style>

<script type="text/javascript" src="<%=request.getContextPath()%>/resource/js/jquery/jquery-1.8.2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/resource/js/constants.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$(".menu-main-box").click(showOrHiddenMenuItem);
		$(".menu > ul > li").click(function(){
			menuItemClick(this.id);
		});
		$("#reloadIframeButton").click(function(){
			$("#reloadIframeButton img").attr({"src":""+WEBROOT+"/resource/images/pages/loading.gif"});
			var url = $("#control_page").attr("src");
			reLoadIframe(url);
			$("#reloadIframeButton img").attr({"src":""+WEBROOT+"/resource/images/pages/refresh.gif"});
		});
		$("#reloadIframeButton").mouseover(function(){
			$("#reloadIframeButton").css({"border": "1px solid #8CC700"});
		});
		$("#reloadIframeButton").mouseout(function(){
			$("#reloadIframeButton").css({"border": "1px solid #AED4F5"});
		});
	});
	
	function showOrHiddenMenuItem() {
		var clickedNode = $(this);
		var ulNode = $(clickedNode).parent().children("ul");
		var dis = ulNode.css("display");
		if (dis == "none") {
			ulNode.css("display", "block");
		} else {
			ulNode.css("display", "none");
		}
	}
	
	function menuItemClick(menuKey) {

		var basePath = '<%=basePath%>';
		var url = $("#control_page").attr("src");
		if (menuKey == "control_user_admin") {
			url = basePath + "/notice/showSiteAndComm";
		}
		if (menuKey == "control_user_ordinary") {
			url = basePath + "/sport/main";
		}
		if (menuKey == "control_index_notice") {
			url = basePath + "/notice/admin/infoAdminNotice";
		}
		if (menuKey == "control_index_ad") {
			url = basePath + "/ad/admin/infoAdminAd";
		}
		if (menuKey == "control_goods") {
			window.open(basePath + "/goods/admin/goodsController", "_target");
			return ;
		}
		if (menuKey == "control_goods_order") {
			window.open(basePath + "/orderForm/admin/getOrderForms", "_target");
			return ;
		}
		if (menuKey == "control_play_dine") {
			url = basePath + "/play/dine/admin/adminDine";
		}
		if (menuKey == "control_play_sport") {
			url = basePath + "/play/dine";
		}
		if (menuKey == "control_play_show") {
			url = basePath + "/play/dine";
		}
		if (menuKey == "control_play_speak") {
			url = basePath + "/play/dine";
		}
		// 小区管理
		if (menuKey == "control_position_admin") {
			url = basePath + "/position/admin/adminPosition";
		}
		
		/* if ($("#control_page").attr("src") != url) {
			reLoadIframe(url);
		} */
		reLoadIframe(url);
	}

	function reLoadIframe(url) {
		$("#control_page").attr("src", url);
	}
</script>

</head>
<body>
	<div class="main-box">
		<div class="top">
			top
			<br>
			<!-- <input type="button" id="reloadIframeButton" value="刷新"> -->
		</div>
		<div class="iframe-reload" id="reloadIframeButton" style="position: absolute; z-index: 1000; width: 45px; height: 45px; top: 81px; right: 184px; background: #8CC700; cursor: pointer; border: 1px solid #AED4F5;" title="点击刷新">
			<img style="width: 45px; height: 45px;" src="<%=basePath %>/resource/images/pages/refresh.gif" alt="刷新" />
		</div>
		<div class="menu-box">、
			<div class="menu">
				<div class="menu-main-box">
					<div class="menu-main-box-text">小区管理</div>
					<div class="menu-main-box-pointer">&gt;</div>
					<div style="clear: both;"></div>
				</div>
				<ul style="display: block;">
					<li id="control_position_admin">小区管理</li>
				</ul>
			</div>
			<div class="menu">
				<div class="menu-main-box">
					<div class="menu-main-box-text">用户管理</div>
					<div class="menu-main-box-pointer">&gt;</div>
					<div style="clear: both;"></div>
				</div>
				<ul>
					<li id="control_user_admin">管理员管理</li>
					<li id="control_user_ordinary">普通用户管理</li>
				</ul>
			</div>
			<div class="menu">
				<div class="menu-main-box">
					<div class="menu-main-box-text">商业管理</div>
					<div class="menu-main-box-pointer">&gt;</div>
					<div style="clear: both;"></div>
				</div>
				<ul>
					<li id="control_index_notice">公告管理</li>
					<li id="control_index_ad">广告管理</li>
				</ul>
			</div>
			<div class="menu">
				<div class="menu-main-box">
					<div class="menu-main-box-text">商品管理</div>
					<div class="menu-main-box-pointer">&gt;</div>
					<div style="clear: both;"></div>
				</div>
				<ul>
					<li id="control_goods">商品管理</li>
					<li id="control_goods_order">订单管理</li>
				</ul>
			</div>
			<div class="menu">
				<div class="menu-main-box">
					<div class="menu-main-box-text">一起运动</div>
					<div class="menu-main-box-pointer"></div>
					<div style="clear: both;"></div>
				</div>
			</div>
			<div class="menu">
				<div class="menu-main-box">
					<div class="menu-main-box-text">一起散步</div>
					<div class="menu-main-box-pointer"></div>
					<div style="clear: both;"></div>
				</div>
			</div>
			<div class="menu">
				<div class="menu-main-box">
					<div class="menu-main-box-text">一起玩</div>
					<div class="menu-main-box-pointer">&gt;</div>
					<div style="clear: both;"></div>
				</div>
				<ul>
					<li id="control_play_dine">聚餐吧管理</li>
					<li id="control_play_sport">运动吧管理</li>
					<li id="control_play_show">秀菜吧管理</li>
					<li id="control_play_speak">吐槽吧管理</li>
				</ul>
			</div>
		</div>
		<div class="control-box">
			<iframe id="control_page" src="<%=basePath %>/position/admin/adminPosition"></iframe>
		</div>
		<div style="clear: both;"></div>
		<!-- <div style="width: 100%; height: 550px; border: 1px dashed red;">
			<div style="float: left; width: 18%; height: 100%; background: #AED4F5;"></div>
			<div style="float: left; width: 82%; height: 100%; background: #CCCCCC;"></div>
			<div style="clear: both;"></div>
		</div> -->
	</div>
</body>
</html>

